package routers

import (
	"blog/controllers"
	"github.com/astaxie/beego"
	//"github.com/astaxie/beego/context"
	"github.com/beego/admin"
)
func init() {
    beego.Router("/", &controllers.MainController{})
	//初始化namespace
//	ns := 
//	beego.NewNamespace("/user",
//	    beego.NSCond(func(ctx *context.Context) bool {
//	        if ctx.Input.Domain() == "localhost" {
//	            return true
//	        }
//	        return false
//	    }),
//	    beego.NSRouter("/reg", &controllers.MemberController{}, "*:Reg"),
//		beego.NSRouter("/login", &controllers.MemberController{}, "*:Login"),
//	)
	//注册namespace
	//beego.AddNamespace(ns)
	admin.Run()
	//beego.Router("/user/reg", &controllers.MemberController{},"*:Reg")
}
